<template>
  <div class="app">
    <h2>自己的str：{{ str }}</h2>
    <Child :str="str" :updateStr="updateStr"/>
  </div>
</template>

<script>
  import Child from "./components/Child";
  export default {
    name:'App',
    components:{Child},
    data() {
      return {
        str:'尚硅谷，让天下没有难掉的头发'
      }
    },
    methods: {
      updateStr(value){
        this.str = value
      }
    },
  }
</script>

<style>
  .app {
    background-color: #ddd;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px;
  }
</style>